package com.itheima.递归.test;

public class Demo {
    public static void main(String[] args) {
        int num = 10;
        int result = getJc(num);
        System.out.println(result);
    }

    private static int getJc(int num) {
        if (num == 1) {
            return 1;
        } else {
            return num * getJc(num - 1);
        }
    }
}
